package servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import entity.flower;
import serivce.service;
import serivce.serviceimpls;
public class tjxh extends HttpServlet {

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		request.setCharacterEncoding("utf-8");
		response.setCharacterEncoding("utf-8");
		response.setContentType("text/html");
		PrintWriter out = response.getWriter();
		service ser =new serviceimpls();
		List<flower> list=ser.tjxh();
		List<flower> lists=ser.xhlh();
		List<flower> aqxh=ser.aqxh();
		List<flower> kyxh=ser.kyxh();
		List<flower> lzxh=ser.lzxh();
		List<flower> cyxh=ser.cyxh();
		request.getSession().setAttribute("cyxhs", cyxh);
		request.getSession().setAttribute("tjxh", list);
		request.getSession().setAttribute("lists",lists);
		request.getSession().setAttribute("aqxh", aqxh);
		request.getSession().setAttribute("kyxh", kyxh);
		request.getSession().setAttribute("lzxh", lzxh);
		response.sendRedirect("qian/index.jsp");
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		response.setContentType("text/html");
		PrintWriter out = response.getWriter();
		doGet(request, response);
	}

}
